import vue from "vue"
import vuex from "vuex"
import system from "./modules/system"
import user from "./modules/user"
import address from "./modules/address"
import persistence from "vuex-uniapp-persistence"
vue.use(vuex)

const store = new vuex.Store({
  state: {
    name: "张三",
  },
  mutations: {
    setName(state, name) {
      state.name = name
    },
  },
  modules: {
    system,
    user,
    address,
  },
  getters: {},
  plugins: [persistence()],
})

export default store
